package com.itheima.mapper;


import com.itheima.pojo.Vip;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface VipMapper {
//添加会员
    @Insert("insert into supermarket.vip (vip_name, phone, reg_time, grade) VALUES" +
            " (#{vipName},#{phone},#{regTime},#{grade})")
    void insert(Vip vip);
//根据ID查询
    @Select("select * from vip where id = #{vipId}")
    Vip getVipById(Integer id);

    List<Vip> list(String name, int page, int rows);

    void update(Vip vip);

    void delete(List<Integer> ids);
}
